package com.zty.user.designPattern.factoryPattern.easy;

/**
 * @Author ZTY
 * @Description 工厂模式的使用Demo
 * @Date 2:36 2023-12-15
 **/

public class FactoryPatternDemo {
    public static void main(String[] args) {
        ShapeFactory shapeFactory = new ShapeFactory();

        //  我要Circle
        Shape circle = shapeFactory.getShape("CIRCLE");
        circle.draw();

        //  我要Rectangle
        Shape rectangle = shapeFactory.getShape("RECTANGLE");
        rectangle.draw();
    }
}
